package yxy.game.pm2.active.module;

import yxy.apple.util.PubSub;
import yxy.apple.util.PubSub.MethodSubscriber;
import yxy.game.pm2.active.module.actcontrol.activeControl;
import yxy.game.pm2.bean.area.AreaBean;
import yxy.game.pm2.bean.module.AreaModule;
import yxy.game.pm2.bean.pubsub.TaskPublisher;

/**
 * @ClassName ActiveSubscriber_开服冲榜
 * @Author jingtao-zheng
 * @Date 2022/7/14 20:04
 * @Version 1.0
 **/
public class ActiveSubscriber_开服冲榜 extends MethodSubscriber {

    static private ActiveSubscriber_开服冲榜 instance;

    public static ActiveSubscriber_开服冲榜 getInstance() {
        if (instance == null) {
            instance = new ActiveSubscriber_开服冲榜();
            instance.init();
        }
        return instance;
    }

    private void init() {
        TaskPublisher.getInstance().subscribe(this);
    }

    private ActiveSubscriber_开服冲榜() {
    }

    @PubSub.SubscriptionMethod(Type = TaskPublisher.TaskSubscription.class)
    public void receive(TaskPublisher.TaskSubscription subscription) {
        String playerCode = subscription.getPlayerCode();
        AreaBean ab = AreaModule.area(playerCode);
        activeControl sai = activeControl.get(ab.getAreaId(), 1001);
        if(null != sai){
            ActiveModule_开服冲榜 am1 = ActiveModule_开服冲榜.get(playerCode,1001);
            ActiveModule_开服冲榜 am2 = ActiveModule_开服冲榜.get(playerCode,1002);
            ActiveModule_开服冲榜 am3 = ActiveModule_开服冲榜.get(playerCode,1003);
            ActiveModule_开服冲榜 am4 = ActiveModule_开服冲榜.get(playerCode,1004);
        }
    }

}
